home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / amazin1a / form2.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-09-05  |  3.9 KB  |  127 lines

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  3. Begin VB.Form Form2 
  4.    BorderStyle     =   0  'None
  5.    Caption         =   "Progress"
  6.    ClientHeight    =   1590
  7.    ClientLeft      =   0
  8.    ClientTop       =   0
  9.    ClientWidth     =   4380
  10.    LinkTopic       =   "Form2"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   1590
  14.    ScaleWidth      =   4380
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   3  'Windows Default
  17.    Begin VB.CommandButton Command1 
  18.       Caption         =   "Cancel"
  19.       Height          =   375
  20.       Left            =   1200
  21.       TabIndex        =   2
  22.       Top             =   1080
  23.       Width           =   1935
  24.    End
  25.    Begin VB.Timer Timer1 
  26.       Enabled         =   0   'False
  27.       Interval        =   200
  28.       Left            =   3840
  29.       Top             =   120
  30.    End
  31.    Begin MSComctlLib.ProgressBar ProgressBar1 
  32.       Height          =   375
  33.       Left            =   120
  34.       TabIndex        =   0
  35.       Top             =   600
  36.       Width           =   4095
  37.       _ExtentX        =   7223
  38.       _ExtentY        =   661
  39.       _Version        =   393216
  40.       Appearance      =   1
  41.    End
  42.    Begin VB.Shape Shape1 
  43.       BorderWidth     =   3
  44.       Height          =   1560
  45.       Left            =   15
  46.       Top             =   15
  47.       Width           =   4335
  48.    End
  49.    Begin VB.Label Label1 
  50.       Caption         =   "Exporting Functions and Subs"
  51.       BeginProperty Font 
  52.          Name            =   "MS Sans Serif"
  53.          Size            =   9.75
  54.          Charset         =   0
  55.          Weight          =   700
  56.          Underline       =   0   'False
  57.          Italic          =   0   'False
  58.          Strikethrough   =   0   'False
  59.       EndProperty
  60.       Height          =   375
  61.       Left            =   480
  62.       TabIndex        =   1
  63.       Top             =   120
  64.       Width           =   3615
  65.    End
  66. Attribute VB_Name = "Form2"
  67. Attribute VB_GlobalNameSpace = False
  68. Attribute VB_Creatable = False
  69. Attribute VB_PredeclaredId = True
  70. Attribute VB_Exposed = False
  71. Dim firstt As Boolean
  72. Private Sub Command1_Click()
  73. ProgressCancel = True
  74. End Sub
  75. Private Sub Form_Load()
  76. firstt = True
  77. Top = Form1.Top + ((Form1.Height / 2)) - (Height / 2)
  78. Left = (Form1.Left + (Form1.Width / 2)) - (Width / 2)
  79. End Sub
  80. Private Sub Form_Paint()
  81. If firstt Then Timer1.Enabled = True
  82. End Sub
  83. Private Sub Progress()
  84. ProgressCancel = False
  85. firstt = False
  86. Form2.ProgressBar1.Min = 1
  87. Form2.ProgressBar1.Max = NbFile
  88. Form2.ProgressBar1.Value = 1
  89. Dim file1, PathFile
  90. file1 = FreeFile
  91. For i = 1 To NbFile
  92.  If ProgressCancel Then Unload Me: Exit Sub
  93.  Form1.Grille1.Row = i
  94.  Form1.Grille1.Col = 1
  95.  PathFile = Form1.Grille1.Text
  96.  Form1.Grille1.Col = 0
  97.  PathFile = PathFile & Form1.Grille1.Text
  98.  Form1.Label3.Caption = "File : " & PathFile
  99.  Open PathFile For Input As file1
  100.   Dim textline
  101.   Do While Not EOF(file1) ' Loop until end of file.
  102.     Line Input #file1, textline ' Read line into variable.
  103.      If Form1.Check1.Value = 0 And InStr(1, textline, "_") <> 0 Then GoTo skip1
  104.        If InStr(1, textline, "Public Sub") <> 0 Then
  105.          Form1.AddFunctionSub Trim(textline), PathFile
  106.        ElseIf InStr(1, textline, "Public Function") <> 0 Then
  107.          Form1.AddFunctionSub Trim(textline), PathFile
  108.        ElseIf InStr(1, textline, "Private Function") <> 0 Then
  109.          Form1.AddFunctionSub Trim(textline), PathFile
  110.        ElseIf InStr(1, textline, "Private Sub") <> 0 Then
  111.          Form1.AddFunctionSub Trim(textline), PathFile
  112.        End If
  113.      
  114.      Form1.Label4.Caption = Form1.Grille2.Rows & " Functions/Subs Found."
  115. skip1:
  116.      DoEvents
  117.    Loop
  118.  Close file1
  119.  If ProgressBar1.Value < NbFile Then ProgressBar1.Value = ProgressBar1.Value + 1
  120.  DoEvents
  121. Unload Me
  122. End Sub
  123. Private Sub Timer1_Timer()
  124. Progress
  125. Timer1.Enabled = False
  126. End Sub
  127.